package com.stx.reflex2;

import java.lang.reflect.Field;

public class reflex2 {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchFieldException, InstantiationException, IllegalAccessException {
        Class<?> c = Class.forName("com.stx.reflex2.User");

        Field idf = c.getDeclaredField("id");

        Object o = c.newInstance();

        idf.setAccessible(true);

        idf.set(o,"110");

        System.out.println(idf.get(o));
    }
}
